# 待校验数据
import jsonschema

data = {
    "message": "操作成功",
    "mobile":"13800000002",
    "name":"may"
}
# 定义规则（json语法）
schema = {
    "type":"object",
    "properties":{
        "message":{"pattern":"操作成功"},
        "mobile":{"pattern":"^[0-9]{11}$"},
        "name":{"pattern":"^[a-z]{3}$"}
    }
}
# 打印结果
res = jsonschema.validate(instance=data,schema=schema)
print(res)